<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="button" value="全选" id="selectAll">
    <input type="button" value="全不选" id="notSelectAll"><br>
    <input type="checkbox" name="" id="">吃饭
    <input type="checkbox" name="" id="">睡觉
    <input type="checkbox" name="" id="">打豆豆
    <input type="checkbox" name="" id="">游戏
    <input type="checkbox" name="" id="">动漫
    <input type="checkbox" name="" id="">打篮球
</body>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
<script>
    $(function () {
        $('#selectAll').click(function () {
            $(':checkbox').prop('checked', true);
        })
        $('#notSelectAll').click(function () {
            $(':checkbox').prop('checked', false);
        })
    })
</script>

</html>